
<style lang="scss" scoped>
#pay {
  box-sizing: border-box;
  min-height: 100%;
  margin-top: 2.8rem;
}

#pay .suc > img {
  width: 104px;
  height: 104px;
  display: block;
  margin-bottom: 12px;
}

#pay > .suc > span {
  font-size: 14px;
  margin-bottom: 12px;
}

#pay > .suc > font {
  font-size: 12px;
  color: rgba(160, 154, 155, 1);
  margin-bottom: 30px;
}


.error img {
  width: 66px;
  height: 66px;
  display: block;
  margin-bottom: 12px;
}

.error > span {
  font-size: 14px;
  color: rgba(255, 137, 156, 1);
  margin-bottom: 10px;
}

.error > p,
.error > font {
  font-size: 12px;
  margin-bottom: 5px;
  color: rgba(160, 154, 155, 1);
}

.btn {
  padding: .25rem .8rem;
  text-align: center;
  font-size: .42rem;
  background: rgba(255,137,156,1);
  color: #FFF;
  outline: none;
  border-radius: 2px;
  border: none;
  margin-top: .2rem;
}
.btn-box {
  margin-top: 5px;
}
</style>

<template>
  <div class="withdrawal">
    <ComHeader title="支付结果" leftArrow="true" />
    <div id="pay">
      <div class="suc flex-display flex-display-column flex-center-align " id="sucbox" v-if="payStatus && payStatus == 'success'">
        <img src="/static/pingtuan/order/pay_img_succeed@2x.png" />
        <span>支付成功</span>
        <font>您已经完成支付</font>
      </div>
      <div class="error flex-display flex-display-column flex-center-align " id="errorBox" v-else>
        <img src="/static/pingtuan/order/pay_img_failure@2x.png" />
        <span>支付失败</span>
        <p>请在<span class="theme-color">15分钟</span>内完成付款</p>
        <font>否则订单会被系统取消</font>
      </div>
      <!--按钮-->
      <div class="btn-box flex-display flex-center-align flex-center-pack">
        <button class="btn" @click="fnOpenOrder">{{ $route.query.get_type == 'buy'?'查看我的订单':'查看我的拼团' }}</button>
      </div>
    </div>
  </div>
</template>
<script>
import ComHeader from "@/common/ComHeader";
export default {
  data() {
    return {
      payStatus: this.$route.query.payStatus
    };
  },
  created() {

  },
  methods: {
    // 跳转到订单
    fnOpenOrder() {
      this.$router.replace({
        path: '/pingtuan/order',
        query: {
          status: 'all'
        }
      })
    },
  },
  components: {
    ComHeader,
  }
};
</script>
